<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<html>
<head>
<script language="javascript">
	$().ready(function(){
		
		if("${loginresult}" == "unfind"){
			$("#loginIDTip").html('帐号不存在');
			$("#loginIDTip").show();
		}else if("${loginresult}" == "unActivate"){
			$("#loginIDTip").html('帐号未激活');
			$("#loginIDTip").show();
		}
		
		$("#submit_data").click(function(){submitData();});

		$("#loginID").keypress(function(e){pressEnter(e.keyCode)});

	});

	function pressEnter(keycode){
		if(keycode == 13){
			submitData();
		}
	}
	
	function submitData(){
		var isCorrect = true;

		//clear tips
		$("span:[id*=Tip]").hide();

		$("#loginID").val(jQuery.trim($("#loginID").val()).toLowerCase());
		if(($("#loginID").attr('value') == "")){
			$("#loginIDTip").html('请输入帐户名');
			$("#loginIDTip").show();
			isCorrect = false;
			return;
		}
		
		if(isCorrect){
			$("#memberForm").submit();
		}
	}
</script>
</head>
<body>
<%
String uri = request.getParameter("redirect_url");
%>
  <div id="main" class="member-log">
  	  <div class="m-login-new"></div>
      <div class="m-login-others"></div>
      <s:form action="simulateLogin.do" method="post" id="memberForm">
      <div class="m-login">
        <h1>登录</h1>
            <ul>
              <li><div><label>帐户名：</label></div><div><input type="text" name="loginID" id="loginID" value="${loginID}" maxlength="100" class="ipt-w20" tabindex="1"/><br /><span id="loginIDTip" class="msg rn" style="display:none">请输入帐户名</span></div></li>
            </ul>
            <p align="center"><a href="###" id="submit_data" class="btn-mid" tabindex="5">登录</a></p>
      </div>
      </s:form>
     </div>
</body>
</html>